Blitz (93/144)

From:Nick Clover
Date:22 May 2001 at 23:20:35
Subject:Re: PROGDIR:

Hello Daniel

On 22-May-01, you wrote:

> I have silly question but how I can read my progdir: path in Blitz?
> Kind Redgards
> Daniel

Use My bit of code from Stats&Funcs:

; Function : ProgsDir {}

; Author : Nick Clover - nick@bauk.freeserve.co.uk

; Returns a string with the program's directory.

; IMPORTANT! Only works with compiled executables,as
; Compiling & Running doesn't use a directory (obviously ;)

; **** REPLACEMENT by Nick Clover ****
; Now returns program directory when run from WB as well!
; Cool :)

; UPDATE - renamed to ProgsDir, to keep in line with ProgsName,
; because ProgDir is a BLITZ Support Suite command.

Function.s ProgsDir{}

MaxLen path$=200
NameFromLock_ GetProgramDir_(),&path$,200
path$=Peek$(&path$)
If Right$(path$,1)<>":" AND Right$(path$,1)<>"/"
path$+"/"
EndIf
If path$="SYS:" Then path$="I only work when compiled!"
Function Return path$
End Function

; demo :

;; note that this returns a name only from executables!
;; you'll just get a blank string if you run it from Blitz!

; Request "","Path : "+ProgsDir{},"OK"
; End

Regards






Nick Clover - http://i.am/bauk



A4000/060, 80Mb, PicassoIV, Paloma, KTX 17" Monitor, Punchinello II

IDE: 10.1Gb HD, LS120, DVD CD SCSI: Fujitsu 18Gb HD,

2x Sony CDD2600 CDR, Aiwa ACD300, Sony CDU625-S, Pioneer DR-124X

Brother HL1250 Laser, External Floppy, Trust V90 & Ergo Keyboard



Microsoft have announced a new OS, they have taken the best bits from

Windows *CE*, Windows *ME* & Windows *NT*

and produced Windows *CEMENT* - as solid as a rock & thick as a brick.


---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list/-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list/-help@netsoc.ucd.ie